/**
 * @验证授权 登录 注册逻辑
 */

const Router = require('koa-router');
const { login, success } = require('../controller/auth.controller');
const { verifyAuth, verifyLogin } = require('../middleware/auth.middleware');
const authRouter = new Router({ prefix: '/api' });

// 登录授权
authRouter.post('/login', verifyLogin, login)

//测试token权限
authRouter.get('/test', verifyAuth, success);

module.exports = authRouter;